package day20171019;

public class UrlSubstring {

    public static void main(String[] args) {
        String url = "http://club.autohome.com.cn/bbs/thread-c-266-65087362-1.html";
        String urlSubstring = url.substring(0,url.length()-6);
        String pageUrl;

        int page = 7;//具体页数通过代码获取
        for(int i = 1;i<=page;i++){
            pageUrl = urlSubstring+i+".html";
            System.out.println(pageUrl);
        }
    }
}
